#makefile
ray : main.cpp all
	g++ -o ray main.cpp  *.o

bmp.o : bmp.c
	gcc -c bmp.c

Sphere.o : Sphere.cpp Sphere.h
	g++ -c Sphere.cpp

Plan.o : Plan.cpp Plan.h
	g++ -c Plan.cpp

Triangle.o : Triangle.cpp Triangle.h
	g++ -c Triangle.cpp

Box.o : Box.cpp Box.h
	g++ -c Box.cpp

Quadric.o : Quadric.cpp Quadric.h
	g++ -c Quadric.cpp

Torus.o : Torus.cpp Torus.h polynomial.o
	g++ -c Torus.cpp

BoundingBox.o : BoundingBox.cpp BoundingBox.h
	g++ -c BoundingBox.cpp

polynomial.o : external/polynomial.cc external/polynomial.h
	g++ -c external/polynomial.cc

Scene.o : Scene.cpp Scene.h
	g++ -c Scene.cpp

Object.o : Object.cpp Object.h
	g++ -c Object.cpp

LocalObject.o : LocalObject.cpp LocalObject.h
	g++ -c LocalObject.cpp

BumpMapping.o : BumpMapping.cpp BumpMapping.h
	g++ -c BumpMapping.cpp

Texture.o : Texture.cpp Texture.h
	g++ -c Texture.cpp

Phong.o : Phong.cpp Phong.h
	g++ -c Phong.cpp

Illumination.o : Illumination.cpp Illumination.h
	g++ -c Illumination.cpp

Light.o : Light.cpp Light.h
	g++ -c Light.cpp

Intersection.o : Intersection.cpp Intersection.h
	g++ -c Intersection.cpp

Ray.o : Ray.cpp Ray.h
	g++ -c Ray.cpp

Observer.o : Observer.cpp Observer.h
	g++ -c Observer.cpp

Image.o : Image.cpp Image.h
	g++ -c Image.cpp

Color.o : Color.cpp Color.h
	g++ -c Color.cpp

Matrix.o : Matrix.cpp Matrix.h
	g++ -c Matrix.cpp

Vector.o : Vector.cpp Vector.h
	g++ -c Vector.cpp

Point.o : Point.cpp Point.h
	g++ -c Point.cpp

clean :
	rm -rf *.o

all :  bmp.o Point.o Vector.o Matrix.o Color.o Image.o Observer.o Ray.o Intersection.o LocalObject.o Object.o Scene.o Torus.o Quadric.o Box.o Triangle.o Plan.o Sphere.o Light.o Illumination.o Phong.o BumpMapping.o Texture.o